home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / ohlutil.zip / CHANGELO.G < prev    next >
Text File  |  1990-06-23  |  76KB  |  1,912 lines

  1. Sat Jun 23 00:06:35 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  2.  
  3.     * Version 1.3.
  4.  
  5.     * du.c (count_entry) [HPUX_NFS_BUG]: If the size of the file
  6.     according to the number of blocks reported is twice or more than
  7.     the size of the file according to the number of bytes
  8.     reported, halve the number of blocks.
  9.  
  10. Fri Jun 22 00:38:20 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  11.  
  12.     * tac.c: Change +regexp to +regex for consistency with GNU find.
  13.  
  14.     * cp.c (copy_dir): Initialize 'ret' to 0.
  15.  
  16.     * cp.c (main), ln.c (main), mv.c (main), rm.c (main):
  17.     Make -i override -f and -o, to be conservative about
  18.     removing peoples' files.
  19.  
  20.     * mkdir.c (make_path), mkfifo.c (make_path): Don't try to stat
  21.     "" or "/".
  22.  
  23.     * rm.c, rmdir.c, mkdir.c, mkfifo.c: Move code to remove
  24.     slashes at the end of an arg from main to
  25.     strip_trailing_slashes. 
  26.  
  27.     * install.c (strip): Print error message if the `strip'
  28.     program can't be run.
  29.  
  30.     * system.h (convert_blocks): Macro moved from du.c and ls.c.
  31.     Take a second parameter indicating whether to convert to
  32.     kilobytes or 512 byte blocks.
  33.     * ls.c, du.c: Pass second parameter to convert_blocks.
  34.  
  35. Thu Jun 21 01:19:28 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  36.  
  37.     * ls.c (print_long_format): Use mode_string instead of
  38.     filemodestring. 
  39.  
  40.     * ls.c (print_long_format): Compare times as longs, not ints.
  41.     (longdiff): Macro to compare two longs efficiently if sizeof
  42.     int == sizeof long and less efficiently but correctly if they
  43.     are different sizes.
  44.     (compare_ctime, etc.): Use longdiff.
  45.  
  46.     * ls.c (decode_switches): Make -k not imply -s, to allow the
  47.     summary directory size printed by -l to be in 1k blocks
  48.     without having the size of each file printed as well.
  49.     (convert_blocks): Provide for systems with a blocksize that is
  50.     other than 512 or 1024 bytes.
  51.  
  52.     * du.c (main): Exit with status 0 normally.
  53.     (convert_blocks): Provide for systems with a blocksize that is
  54.     other than 512 or 1024 bytes.
  55.  
  56. Wed Jun 20 01:46:09 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  57.  
  58.     * cat.c (cat): If FIONREAD is available, only use it if it is
  59.     supported by the filesystem that the file is on.
  60.  
  61.     * ln.c (do_link): Take out code to give an error if source and
  62.     dest are the same file.  The dubious usefulness of the special
  63.     case to prevent 'ln x x' from removing 'x' (ln -i can be used
  64.     instead) is not worth preventing 'ln x y' from failing the
  65.     second time in a row, and appears to contradict POSIX anyway.
  66.  
  67. Mon Jun 18 02:48:17 1990  David J. MacKenzie  (djm at apple-gunkies)
  68.  
  69.     * ls.c (print_file_name_and_frills,
  70.     length_of_file_name_and_frills, print_long_format):
  71.     Allow 6 digits for i-number, not 5.
  72.  
  73. Sun Jun 17 00:09:23 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  74.  
  75.     * install.c (install_dir): Don't check whether "" or the root
  76.     directory exists (the former fails on some systems).
  77.  
  78.     * system.h: Make inclusion of sys/file.h conditional on USG
  79.     and _POSIX_SOURCE, not DIRENT.
  80.  
  81.     * chmod.c (change_dir_mode): Use xrealloc instead of free and
  82.     xmalloc in case malloc already left extra room.
  83.     (xrealloc): New function.
  84.  
  85.     * rm.c (clear_directory): Prevent buffer overruns.
  86.     More efficient string handling.  Don't skip rest of directory
  87.     if continuing after finding circular inode.
  88.     (xrealloc): New function.
  89.  
  90. Sat Jun 16 01:45:42 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  91.  
  92.     * argmatch.c (invalid_arg): Change order in which the items
  93.     are printed. 
  94.  
  95.     * ls.c: Add +tabsize (-T) option.
  96.  
  97. Fri Jun 15 23:40:55 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  98.  
  99.     * dd.c (scanargs): For ibs and obs, set C_HARDWAY.
  100.     (copy): Use different buffers only if C_HARDWAY, not if
  101.     blocksizes are the same, to ensure constant output block sizes.
  102.  
  103. Wed Jun 13 23:56:20 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  104.  
  105.     * savedir.c: New file from code in chmod.c, modified to
  106.     prevent buffer overruns.
  107.     * chmod.c (change_dir_mode), cp.c (copy_dir), du.c
  108.     (count_entry): Use savedir.
  109.  
  110. Thu Jun  7 03:52:02 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  111.  
  112.     * system.h (ST_BLKSIZE) [!STBLOCKS_MISSING]: If st_blksize is
  113.     0 (as on pipe reads on some systems), use BSIZE instead.
  114.     Define BSIZE as DEV_BSIZE if necessary.
  115.  
  116.     * Makefile, system.h, fileblocks.c: Use STBLOCKS_MISSING to
  117.     control whether st_blksize and st_blocks are used.
  118.     * Makefile, system.h, backupfile.c: Use DIRENT to control
  119.     whether <dirent.h> is used.
  120.  
  121. Sun Jun  3 20:26:19 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  122.  
  123.     * cat.c (main): Add a variable to control whether the check
  124.     for input file == output file is made, because no values of
  125.     st_dev and st_ino should be assumed to be available for this
  126.     purpose.  Only do the check for regular files.
  127.  
  128.     * tac.c: Use bcopy instead of memcpy.
  129.  
  130. Thu May 31 00:55:36 1990  David J. MacKenzie  (djm at apple-gunkies)
  131.  
  132.     * fileblocks.c: New file.
  133.     * du.c (blocks_to_kb): Replace with convert_blocks macro.
  134.     (main): Recognize new -k option.
  135.     (usage): Document it.
  136.     * ls.c (nblocks): Replace with convert_blocks macro.
  137.     * system.h (ST_BLKSIZE) [USG]: Use BSIZE from sys/param.h instead of
  138.     having the user define BLKSIZE.
  139.     (ST_NBLOCKS) [USG]: Use st_blocks from fileblocks.c.
  140.  
  141.     * head.c: Use longs instead of ints for file offsets, for 16
  142.     bit machines.
  143.  
  144.     * cat.c, chmod.c, cmp.c, cp.c, cp.h, create.c, dd.c, dirlib.c,
  145.     du.c, head.c, system.h, backupfile.c, ln.c, ls.c, install.c,
  146.     mkdir.c, mkfifo.c, modechange.c, mv.c, mv_dir.c, rm.c,
  147.     rmdir.c, tail.c, tac.c: Optionally use ANSI C and POSIX header files.
  148.  
  149. Wed May 23 00:40:39 1990  David J. MacKenzie  (djm at apple-gunkies)
  150.  
  151.     * argmatch.c: New file, taken from ls.c.
  152.     * getversion.c (get_version): Use argmatch, to allow
  153.     abbreviations.  Default backup type is existing_numbered.
  154.     * mv.c (main), ln.c (main), cp.c (main): Only make backups if
  155.     -b (+backup) is given.  If envar SIMPLE_BACKUP_SUFFIX is set,
  156.     use it as a default instead of `~'.
  157.     * mv.c (usage), ln.c (usage), cp-aux.c (usage): Update messages.
  158.  
  159. Tue May 22 00:56:51 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  160.  
  161.     * install.c: New file (from ../bin-src).
  162.  
  163.     * cmp.c: Change some ints to longs for 16 bit machines.
  164.     (bcmp_cnt): Make char-pointer counting slightly simpler.
  165.  
  166.     * dd.c (copy): Don't count completely failed writes as partial
  167.     writes.  Make buffers unsigned.  If blocking or unblocking,
  168.     pad final partial buffer if necessary.
  169.  
  170.     * getversion.c: New file.
  171.     * mv.c (main), cp.c (main), ln.c (main): Control backup types
  172.     with getenv ("VERSION_CONTROL") and +version-control or -V.
  173.  
  174.     * cp.c (yesno), mv.c (yesno), ln.c (yesno): Stop reading if
  175.     EOF reached as well as at newline.
  176.  
  177.     * backupfile.[ch]: Rename var `version_control' to `backup_type'.
  178.  
  179. Sat May 19 00:16:50 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  180.  
  181.     * mv.c (main), ln.c (main), cp.c (main): Revise
  182.     backup-creation options.
  183.     * mv.c (usage), ln.c (usage), cp-aux.c (usage): Revise messages.
  184.  
  185.     * chmod.c (describe_change): Use mode_string instead of
  186.     filemodestring. 
  187.  
  188.     * cp.c (main): Recognize new options for making backups.
  189.     * cp.c (copy): Make backups if requested.  Fix typo.
  190.     * cp-aux.c (usage): Update message.
  191.  
  192.     * mv.c, cp.c: Remove code to conditionally use utimes instead
  193.     of utime, since the extra resolution of utimes was not being
  194.     used, the emulation overhead is probably insignificant,
  195.     and utime is a standard function.
  196.  
  197.     * cp-hash.c: Fix up comments.
  198.  
  199. Fri May 18 23:06:23 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  200.  
  201.     * mv.c (do_move): Only make backup if dest file exists.
  202.     Don't continue moving file if dest can't be backed up.
  203.     * ln.c (do_link): Don't try to unlink dest if it was backed up.
  204.     Don't continue moving file if dest can't be backed up.
  205.  
  206.     * system.h: Make SIGTYPE default to void if not defined.
  207.  
  208.     * modechange.[ch]: Rename struct and external functions to start
  209.     with 'mode_'.
  210.     * modechange.c (oatoi): Make static.
  211.     (mode_compile): Take an additional arg indicating which
  212.     symbolic operators should be affected by the umask.
  213.     * modechange.h: Add defines for mode_compile arg mask.
  214.     If __STDC__, use prototypes.
  215.     * chmod.c, mkdir.c, mkfifo.c, create.c: Account for above changes.
  216.  
  217. Tue May 15 16:17:34 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  218.  
  219.     * dd.c (copy): Quit with nonzero status if final write fails.
  220.  
  221. Mon May 14 14:34:10 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  222.  
  223.     * tac.c, regex.c, regex.h: New files.
  224.  
  225.     * dd.c: Make translation tables unsigned.
  226.     (main): Give `input_file' and `output_file' nonzero values for
  227.     stdin and stdout. 
  228.     (parse_conversion): Set new global vars 'space_character' and
  229.     'newline_character' to correct values when translating to EBCDIC
  230.     (either flavor).
  231.     (copy): Use 'space_character' and 'newline_character' instead
  232.     of hardcoded ASCII values.  Ignore attempts to seek on output pipe,
  233.     socket, or fifo.  If possible, seek instead of reading to skip
  234.     initial input records.  Sync with `space_character' instead of
  235.     nulls, for POSIX.
  236.  
  237.     * cp.c (copy_reg): Compare lseek values as longs, not ints.
  238.  
  239. Sat May 12 01:16:42 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  240.  
  241.     * cp-hash (remember_created): Return error status instead of
  242.     fatal error. 
  243.     * cp.c (copy): Change caller.
  244.     (do_copy, copy_reg): Return error status instead of fatal error.
  245.  
  246.     * cat.c (main): Allow input file to be output file for devices
  247.     (ttys, etc.).  Check whether input file is output file when
  248.     reading standard input.  Print any error messages for standard
  249.     input. 
  250.  
  251.     * cmp.c (bcmp_cnt): Handle int comparisons correctly on 16 bit
  252.     machines as well as 32 bit ones.
  253.     * cmp.c, tail.c, ls.c, cp.c, du.c: Use longs instead of ints
  254.     for file offsets. 
  255.  
  256.     * Move rename emulation from mv.c to dirlib.c so other
  257.     programs can use it.
  258.     * mv.c, ln.c (main): Recognize new options for making backups.
  259.     * mv.c (do_move), ln.c (do_link): Make backups if requested.
  260.     * mv.c, ln.c (usage): Update message.
  261.     * backupfile.c, backupfile.h: New files.
  262.  
  263.     * cp.h: Ifdef out decl of umask because of SunOS 4.1 (POSIX) conflict.
  264.  
  265.     * Define all `main' functions as returning void.
  266.  
  267. Fri May 11 02:11:03 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  268.  
  269.     * ln.c, mv.c, rm.c, rmdir.c, create.c, chmod.c: Change some
  270.     error messages. 
  271.  
  272.     * cmp.c: Fix some exit statuses for POSIX.
  273.  
  274.     * du.c, cmp.c, cat.c, cp-aux.c (error): Function removed.
  275.     Change callers to use error.c version.
  276.     * cp.c (copy, do_copy, copy_dir): Return an error status.
  277.     * ls.c (error, fatal, perror_with_name): Functions removed.
  278.     Change callers to use error.c.
  279.  
  280. Tue May  8 03:41:42 1990  David J. MacKenzie  (djm at abyss)
  281.  
  282.     * tac.c: Use regular expressions as the record boundaries.
  283.     Give better error messages.
  284.     Reformat code and make it more readable.
  285.     (main): Use getopt_long to parse options.
  286.     (tac_stdin): Do not make a temporary file if standard input
  287.     is a file.
  288.     (tac_file): New function.
  289.     (tac): Take an open file desc as an arg.
  290.     (output): Rewrite to use its own efficient buffering.
  291.     (xmalloc, xrealloc, xwrite): New functions.
  292.  
  293. Sat May  5 23:46:48 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  294.  
  295.     * ln.c (do_link): Don't allow trying to link a file to itself,
  296.     because the source file would be removed if they are the same
  297.     directory entry, and also for consistency with mv and cp.
  298.  
  299. Fri May  4 13:42:53 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  300.  
  301.     * cp.c (copy_reg): Only write a null to the end of the file if
  302.     the end of the file was sparse.
  303.  
  304.     * ls.c (print_name_with_quoting): Make the char to print
  305.     unsigned to prevent sign extension problems with -b.
  306.  
  307. Fri Apr 20 13:52:15 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  308.  
  309.     * Version 1.2 released.
  310.  
  311. Wed Apr 18 14:36:15 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  312.  
  313.     * Makefile: Use chsize for ftruncate on Xenix.
  314.  
  315.     * cp.c (copy): Remove broken code that attempted to
  316.     substitute for ftruncate on systems missing it.
  317.  
  318. Mon Apr 16 13:58:01 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  319.  
  320.     * cp-aux.c (usage): Fix mistake in message.
  321.  
  322.     * Version 1.1 released.
  323.  
  324. Sat Apr 14 17:23:11 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  325.  
  326.     * ls.c (main): Don't remove leading path from program_name.
  327.     (basename): Function removed.
  328.     (length_of_file_name_and_frills): Don't add 1 for type indicator
  329.     for block and character special files. 
  330.  
  331. Thu Apr 12 19:50:15 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  332.  
  333.     * Makefile: Suggest using -DBLKSIZE=512 instead of 1024 for USG.
  334.  
  335.     * dd.c (copy): Print copying statistics when exiting because
  336.     of a read or seek error.
  337.     (interrupt_handler): New function.
  338.     (main): Trap SIGINT to run interrupt_handler, for POSIX.
  339.  
  340. Tue Apr 10 01:09:38 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  341.  
  342.     * chmod.c (change_file_mode): Don't change the mode of
  343.     symbolic links.
  344.  
  345. Mon Apr  9 13:30:00 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  346.  
  347.     * modechange.c (compile_mode): Return an error if an octal
  348.     number argument is too large.
  349.  
  350. Sun Apr  8 20:33:20 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  351.  
  352.     * dd.c: Use `error' instead of `fatal' and `pfatal_with_name',
  353.     for greater control of the message format.
  354.     * head.c, tail.c: Use `error' instead of `fatal_perror' and
  355.     `nonfatal_perror'.  Remove some unnecessary info from messages.
  356.     * chmod.c, create.c, ln.c, mkdir.c, mkfifo.c, mv.c, mv_dir.c,
  357.     rm.c, rmdir.c: Remove definition of `error'.
  358.     * error.c: New file created from code in mv.c.
  359.     * Makefile: Link the above programs with error.o.
  360.  
  361.     * ln.c (do_link): Use eaccess_stat to determine writability.
  362.     * mv.c (do_move): Ditto.
  363.     * rm.c (remove_file): Ditto.
  364.     (remove_dir): Use eaccess_stat to determine readability and
  365.     searchability.  Move initial interactive query here from
  366.     clear_directory. 
  367.     * Makefile: Link ln, mv, and rm with eaccess.o.
  368.  
  369. Sat Apr  7 11:47:52 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  370.  
  371.     * Makefile: Link cp with eaccess.o.
  372.     * eaccess.c: New file adapted from code in cp.c and cp-aux.c.
  373.     * cp.c (copy): Use eaccess_stat to determine writability.
  374.     Consider a file unwritable by root if it has no permissions.
  375.     (main): Remove groups initialization code.
  376.     * cp-aux.c (member): Function deleted.
  377.  
  378.     * cp.c (copy): Temporarily change the mode of directories if
  379.     necessary to overwrite them when running recursively.
  380.     Consider a directory to be non-overwritable if it lacks write
  381.     permission as well as if it lacks execute permission.
  382.  
  383.     * cat.c (main), cp.c (copy_reg): Don't check error from close,
  384.     because we know the arg is good and so it cannot fail.
  385.  
  386.     * rm.c, mv.c, mv_dir.c, chmod.c, create.c, ln.c: Remove some
  387.     irrelevant or redundant information from error messages.
  388.  
  389. Fri Apr  6 15:20:45 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  390.  
  391.     * cp.c (copy): Only change mode of regular files and directories;
  392.     others are already correct.
  393.  
  394. Thu Apr  5 04:31:56 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  395.  
  396.     * dd.c: Remove the vars that are set by command line options
  397.     from a useless struct and give them more meaningful names.
  398.  
  399. Mon Apr  2 02:58:34 1990  David J. MacKenzie  (djm at spike.ai.mit.edu)
  400.  
  401.     * cp.c (main): Use NGROUPS from sys/param.h to determine
  402.     whether BSD multiple groups are supported and how large to
  403.     make the array.
  404.     * Makefile: Remove references to GETGROUPS_MISSING.
  405.  
  406. Sun Apr  1 18:53:57 1990  David J. MacKenzie  (djm at spike.ai.mit.edu)
  407.  
  408.     * cp.c (main): Always initialize group info.
  409.  
  410. Sat Mar 31 22:29:57 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  411.  
  412.     * mkfifo.c, create.c, mv_dir.c: New files.
  413.     * Makefile: Add rules for them.
  414.     * mv.c [RENAME_MISSING] (rename): To rename directories, run
  415.     setuid root mv_dir program. 
  416.  
  417. Sun Mar 18 01:02:39 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  418.  
  419.     * ln.c (strip_trailing_slashes): New function.
  420.     (main, do_link): Call it.
  421.  
  422.     * cp-aux.c (strip_trailing_slashes): New function.
  423.     * cp.c (do_copy): Call it.
  424.     * cp.h: Declare it.
  425.  
  426.     * mv.c (strip_trailing_slashes): New function.
  427.     (main, movefile): Call it.
  428.  
  429. Sat Mar 17 21:45:35 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  430.  
  431.     * cp-aux.c, cp.h: Rename user_confirm_overwriting to yesno and
  432.     don't have it print a prompt, so it can be used in several
  433.     places. 
  434.  
  435.     * cp.c (do_copy): Change an error message to resemble mv's.
  436.     Remove all trailing slashes from all non-option args.
  437.     (main): Set new global var `stdin_not_tty'.
  438.     (copy): Use POSIX method of handling file overwriting and
  439.     prompting. 
  440.  
  441.     * dirlib.c (mkdir): Use chmod to set the directory mode after
  442.     successful creation, so set[ug]id and sticky bits are set
  443.     correctly. 
  444.  
  445. Thu Mar 15 12:33:23 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  446.  
  447.     * Makefile: Add commented out definitions for SCO Xenix.
  448.  
  449.     * ls.c (print_type_indicator): Don't print a '*' next to
  450.     executable block or character special files.
  451.  
  452.         * chmod.c (error): New function, replacing nonfatal_perror,
  453.         memory_out, and invalid_mode.
  454.         Global: Call error instead of the above functions.
  455.     (change_dir_mode): Make the new size of the path twice the
  456.     size of the name that was too long, rather than twice its old
  457.     size. 
  458.  
  459.     * rm.c: Move interactive query about whether to remove a
  460.     directory from remove_dir to clear_directory; only query for
  461.     directories that are not empty.
  462.  
  463. Wed Mar 14 10:48:40 1990  David J. MacKenzie  (djm at rice-chex)
  464.  
  465.     * system.h [USG]: Define X_OK.
  466.  
  467.     * rm.c (main): Set new global var `stdin_not_tty'.
  468.     (rm): Most of code moved to two new functions, remove_file and
  469.     remove_dir.
  470.     (remove_file): Use POSIX method of determining whether to remove
  471.     non-directories.
  472.     (remove_dir): Use POSIX method of determining whether to
  473.     remove directories, almost.
  474.     (perror_with_name): Function removed.
  475.     (error): Simple version replaced with more powerful version.
  476.     Global: Change calls to fprintf, perror_with_name, and old
  477.     error to calls to new error.
  478.  
  479.     * ln.c (main): Set new global var `stdin_not_tty'.
  480.     If force, turn off interactive.
  481.     (do_link): By default, don't allow hard links to symbolic links to
  482.     directories.  Use POSIX method of determining whether to
  483.     overwrite destination.
  484.     (yesno): Function renamed from confirm, and arg removed.
  485.     (lisdir): Function removed.
  486.  
  487.     * mv.c (main): Set new global var `stdin_not_tty'.
  488.     (yesno): Function renamed from yes.
  489.     (do_move): Use POSIX method of determining whether to
  490.     overwrite destination.
  491.  
  492.     * Makefile: Make executables depend on .o files, not .c files,
  493.     to allow for parallel compilation.
  494.  
  495.     * cmp.c (main, cmp, usage): Replace -q +quick option with -L
  496.     +show-chars option to add ASCII representation of bytes to -l format.
  497.  
  498. Tue Mar 13 00:50:14 1990  David J. MacKenzie  (djm at rice-chex)
  499.  
  500.     * rm.c (main): Disallow removal of paths that have '..' as the
  501.     final element.
  502.     (basename): New function.
  503.  
  504.     * ls.c (print_type_indicator): Mark FIFOs with '|' and sockets
  505.     with '='.
  506.     (print_long_format): Print numbers as unsigned and add extra
  507.     space for POSIX flag.
  508.  
  509.     * dd.c: Make the record counts unsigned.
  510.     (quit): Print them as unsigned.
  511.  
  512.     * cmp.c (cmp): Change EOF message for POSIX compatibility.
  513.     For -l format, clear bits > FF.
  514.  
  515.     * modechange.c (compile_mode): Only get umask value when needed.
  516.     If users are not given or are `a', affect set?id and sticky bits.
  517.     If memory is exhausted while allocating a new list element,
  518.     free the old elements before returning.
  519.  
  520.     * Makefile (CC): Add comment noting that either fixincludes or
  521.     -traditional needs to be used for gcc to compile ioctl calls
  522.     correctly. 
  523.  
  524. Fri Mar  9 10:25:09 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  525.  
  526.     * chmod.c (main): Recognize "a,+-=" as valid options.
  527.  
  528.     * mv.c: Move the code to copy files across filesystems from
  529.     do_move to a new function, copy, which will eventually be
  530.     replaced with modules from cp and rm (POSIX requires mv to
  531.     move directories recursively across filesystems).
  532.     (do_move): Don't query about overriding a mode that prohibits
  533.     writing if interactive.  Remove unneeded variable.
  534.     (copy): Unlink target if copy fails partway through.
  535.  
  536. Thu Mar  8 10:56:16 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  537.  
  538.     * cp.c (copy): Don't remove a destination file of a different
  539.     type unless +force is given.
  540.  
  541.     * ls.c (decode_switches, usage): Add -U (for "unsorted") as an
  542.     equivalent to +sort=none.
  543.  
  544. Mon Mar  5 17:21:00 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  545.  
  546.     * tail.c: Move global `errors' into main instead of having
  547.     nonfatal_perror set it.
  548.     (tail, tail_chars, tail_file, tail_lines, pipe_chars, pipe_lines):
  549.     Return an error status.
  550.     (file_lines, start_chars, start_lines): Reverse the meaning of
  551.     the return value.
  552.     (tail_lines, tail_chars): Account for that reversal.
  553.  
  554. Mon Mar  5 16:31:14 1990  Torbj|rn Granlund  (tege at echnaton)
  555.  
  556.     * cp.c (copy): Test for temporarily modified permission mode
  557.       after the other test, so that `-p' work for files whose mode
  558.       needed a temporary mode change.
  559.     * cp.c (copy): Don't waste time calling unlink if we already
  560.       know that the destination doesn't exists.
  561.     * cp.c (comment before do_copy): Correct.
  562.     * cp.c (comment before copy): Describe all params.
  563.     * cp.c (copy): Only change permission mode for regular files
  564.       and directories.
  565.     * cp.c (copy): Unlink the destination file if its type is
  566.       different from the source.  If the destination is a
  567.       directory,  error.
  568.  
  569. Mon Mar  5 00:34:36 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  570.  
  571.     * chmod.c (nonfatal_perror): Don't check for force_silent.
  572.     (change_file_mode, change_dir_mode): If force_silent, don't
  573.     print error messages.
  574.  
  575.     * mv.c (main): If force, turn off interactive.
  576.     (do_move): Simplify check for query.  Rename `stb' to
  577.     `to_stats' and `stbf' to `from_stats'.
  578.     Return error condition if original file could not be renamed or
  579.     unlinked. 
  580.  
  581.     * rm.c: Rename global `force_flag' to `ignore_errors' and change its
  582.     meaning so that it does not overlap with `override_mode'.
  583.     (main): Have -f +force set override_mode.  If override_mode is
  584.     set, turn off interactive.
  585.     (rm): Simplify checks for whether to query the user, based on
  586.     the new relationship between override_mode and interactive.
  587.  
  588.     * head.c: Move global `errors' into main and have the various
  589.     functions return an error status instead of setting it in
  590.     nonfatal_perror. 
  591.  
  592. Sun Mar  4 23:39:03 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  593.  
  594.     * ln.c (main): Reword an error message to be more like mv's.
  595.  
  596.     * rmdir.c: Move global `errors' into main instead of having 
  597.     error set it.
  598.  
  599.     * mkdir.c: Move global `errors' into main and have make_path
  600.     return an error status instead of having error set it.
  601.  
  602.     * chmod.c: Move global `errors' into main and have
  603.     change_file_mode and change_dir_mode return an error status
  604.     instead of setting it in nonfatal_perror.
  605.  
  606. Sat Mar  3 13:59:40 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  607.  
  608.     * ln.c (main): Don't strip leading dirs from argv[0].
  609.  
  610.     * ln.c (confirm), mv.c (yes, do_move),
  611.     cp-aux.c (user_confirm_overwriting), rm.c (rm, yesno, check_stack):
  612.     Print query messages to stderr instead of stdout, for POSIX.
  613.     Include program name in messages.
  614.  
  615. Sat Mar  3 11:27:27 1990  Torbj|rn Granlund  (tege at echnaton)
  616.  
  617.     * cmp.c (cmp): Call function bcmp_cnt for flag == 0 (i.e. no
  618.       options specified), to compare the two blocks and count
  619.       newlines simultaneously.
  620.     * cmp.c New function: bcmp_cnt.
  621.  
  622.     * cmp.c (main): Test if output is redirected to /dev/null, and
  623.       assume `-s' if this is so.
  624.  
  625.     * cp.c (copy): Don't unlink directories with flag_force
  626.       (`-f').  Also avoid using force when not necessary.
  627.       Always copy fifo's and symbolic links as themselves.
  628.  
  629.     * cp.c (copy_reg): Make int scan first, char scan then, to
  630.       find frist non-zero byte.  This to avoid false hole
  631.       creation.
  632.  
  633. Sat Mar  3 10:22:28 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  634.  
  635.     * mv.c: Rename `pgm' to `program_name'.  Move global `errors'
  636.     into main.  Have do_move and movefile return an error status
  637.     instead having error set it.  Remove global vars `args'
  638.     and `args_left'.
  639.     (main): Rename `ac' and `av' to `argc' and `argv' and use them
  640.     and `optind' instead of `args' and `args_left'.
  641.  
  642.     * cp.c (copy): Don't ignore errors other than EPERM from chown.
  643.  
  644. Fri Mar  2 16:20:57 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  645.  
  646.     * rm.c (main, usage): Allow -R as a synonym for -r, for POSIX.
  647.  
  648.     * cp.c (copy): If flag_preserve, preserve the owner and group
  649.     if possible, as well as mode.
  650.     (main): Allow -R as a synonym for -r option, for POSIX.
  651.     * cp-aux.c (usage): Mention -R.
  652.  
  653. Tue Feb 27 11:49:04 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  654.  
  655.     * cp.c (copy): If not recursive, copy special files and
  656.     symlinks like regular files and omit fifos.
  657.  
  658. Mon Feb 26 19:55:24 1990  Jim Kingdon  (kingdon at pogo.ai.mit.edu)
  659.  
  660.     * ls.c (print_long_format): If time is in the future, print
  661.     the year.
  662.     Make the cutoff for old files 6 months not 300 days.
  663.  
  664. Mon Feb 26 15:03:29 1990  Torbj|rn Granlund  (tege at echnaton)
  665.  
  666.     * cp.c (copy): Test for recursive copy in DIR alternative in
  667.       the switch statement, so all file types are copied correctly
  668.       even in a non-recursive copy.
  669.     * cp.c (copy): Return after having created a symlink, since
  670.       chmod and utimes dereference, and would affect the symlink
  671.       target.  Remove test for symlinks after switch.
  672.  
  673. Sun Feb 25 18:31:09 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  674.  
  675.     * Makefile: Compile ls after vdir so systems with a cc that
  676.     can't do -c -o don't have to compile ls.c twice for ls.
  677.  
  678.     * dd.c (usage): Add braces around alternatives.
  679.  
  680.     * ls.c (print_long_format): Always print the group, for POSIX.
  681.     (decode_switches): Make -g option a no-op for BSD users.
  682.     (usage): Remove +group option.
  683.  
  684.     * cat.c (main, usage): Add -c option, identical to -s, for
  685.     POSIX.  Alphabetize short options.
  686.  
  687. Wed Feb 21 11:13:26 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  688.  
  689.     * ln.c (error): New function.
  690.     (main, do_link): Call error instead of fprintf and exit.
  691.     (main): Recognize new -d +directory option to allow superuser to
  692.     make hard links to dirs, like the BSD ln -f option.
  693.     (do_link): Don't allow hard links to dirs (they are hard to
  694.     get rid of -- rmdir and unlink don't do it), unless -d was given.
  695.     (usage): Mention -d +directory option.
  696.  
  697.     * rmdir.c (main): Remove trailing slashes from args (added by
  698.     shell file completion but the rmdir syscall can't handle them).
  699.     * mkdir.c (main): Remove trailing slashes from args, for
  700.     uniformity with rmdir (you can't do file completion on dirs
  701.     that haven't been made yet . . .).
  702.  
  703.     * mv.c: Rename global var `nargs' to `args_left' to avoid
  704.     conflict with undocumented BSD libc function (the new name is
  705.     clearer, anyway).
  706.  
  707. Tue Feb 20 17:09:19 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  708.  
  709.     * dd.c: Use new global var `program_name' in error messages
  710.     instead of hardcoded "dd".
  711.     (main): Set program_name from argv[0].
  712.  
  713.     * chmod.c, head.c, tail.c (main): Don't strip leading dirs
  714.     from argv[0].
  715.     (basename): Function removed.
  716.  
  717.     * rm.c (main): Don't strip leading dirs from argv[0].
  718.  
  719.     * cat.c: Change `argbad' from a char to a short, so it will
  720.     work on machines with unsigned chars.
  721.  
  722. Mon Feb 19 14:34:18 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  723.  
  724.     * rm.c (main): Strip trailing slashes from each arg.
  725.  
  726. Thu Feb 15 13:23:52 1990  David J. MacKenzie  (djm at rice-chex)
  727.  
  728.     * Makefile [HPUX CFLAGS]: Add -DUTIMES_MISSING.
  729.  
  730. Wed Feb 14 15:01:18 1990  David J. MacKenzie  (djm at rice-chex)
  731.  
  732.     * Makefile (dist): Don't make a non-compressed tar file.
  733.  
  734.     * mv.c (do_move): Refuse to copy non-regular files across filesystems.
  735.  
  736. Mon Feb 12 11:30:45 1990  David J. MacKenzie  (djm at rice-chex)
  737.  
  738.     * ln.c (do_link): Check error return from unlink.
  739.     Include errno.h.
  740.  
  741.     * du.c (main): Check error return from stat.
  742.     (str_copyc, str_concatc): Don't return a value, since it is
  743.     ignored. 
  744.  
  745.     * cp.c (copy): Check error return from unlink and chmod.  Fix
  746.     typo in call to error.
  747.  
  748.     * mv.c (do_move): Check error return of fchmod/chmod and utime[s].
  749.     (rename): Check error return of unlink.
  750.  
  751.     * Makefile Definitions of preprocessor macros moved from
  752.     cp.c and mv.c.  HAVE_FTRUNCATE changed to FTRUNCATE_MISSING.
  753.     * Makefile, dirlib.c: NEED_MKDIR changed to MKDIR_MISSING.
  754.     * mv.c, cp.c: Change USG ifdefs to UTIMES_MISSING.
  755.  
  756. Sun Feb 11 17:50:29 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  757.  
  758.     * chmod.c (usage): Add yet another ellipsis.
  759.  
  760. Sun Feb 11 16:41:30 1990  Jim Kingdon  (kingdon at pogo.ai.mit.edu)
  761.  
  762.     * cp.c (copy_reg): Use HAVE_FTRUNCATE to decide whether to
  763.     use ftruncate().
  764.     (main): Use GETGROUPS_MISSING to decide whether to use getgroups().
  765.     [hpux || !USG]: Define HAVE_FTRUNCATE.
  766.     [USG && !hpux]: Define GETGROUPS_MISSING.
  767.     mv.c (rename): Put in #ifdef RENAME_MISSING not #ifdef USG.
  768.     (do_move): Use FCHMOD_MISSING to decide whether to use fchmod().
  769.     [USG && !hpux]: Define FCHMOD_MISSING and RENAME_MISSING.
  770.  
  771. Sat Feb 10 02:16:40 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  772.  
  773.     * cmp.c (cmp): Rename `r' to `first_diff', and `x' to `smaller'.
  774.     Remove unneccessary variable `c1'.  If -l was given, increase
  775.     `char_number' by the number of bytes read, after producing output,
  776.     rather than by the offset of the first differing bytes, before
  777.     producing output.
  778.     Replace if-else-if constructions with case statements for clarity.
  779.     (bcmp2): Rename `n' to `nread'.
  780.  
  781. Fri Feb  9 10:25:03 1990  David J. MacKenzie  (djm at rice-chex)
  782.  
  783.     * mv.c (movefile): Remove trailing slashes from FROM (some
  784.     filename completion systems add them for dirs, and they cause
  785.     the rename syscall to fail).
  786.  
  787. Thu Feb  8 22:50:12 1990  Torbj|rn Granlund  (tege at sics.se)
  788.  
  789.     * cp.c (copy_reg): Change error handling after lseek, since
  790.       this is a fatal error.  Also change error message to
  791.       something more generally understood.
  792.     * Handle files that end in a zero block on USG systems.
  793.  
  794.     * cp-aux.c (error): Use FATAL to recog fatal errs.
  795.  
  796. Thu Feb  8 21:25:40 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  797.  
  798.     * ln.c: Remove incorrect comment.
  799.  
  800.     * cp.c, cp-aux.c (usage): Change +dereference option to
  801.     +no-dereference, since dereferencing is done by default and
  802.     the option turns it off.
  803.  
  804. Mon Feb  5 17:29:20 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  805.  
  806.     * Version 1.0 released.
  807.  
  808.     * Move discussion of missing tail -r option from tail.c to README.
  809.  
  810. Sun Feb  4 02:23:01 1990  David J. MacKenzie  (djm at rice-chex)
  811.  
  812.     * Makefile: Note that _doprnt seems to be broken on the sparc.
  813.     Get rid of separate defaults for USG and BSD because the
  814.     distinction is blurry.
  815.  
  816. Sat Feb  3 04:03:32 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  817.  
  818.     * cp.c (do_copy, copy, copy_dir): Rename `new_structure' to `new_dst'.
  819.     (copy): If unlink because of flag_force succeeds, make new_dst
  820.     nonzero.  Fix wrong comment.
  821.  
  822.     * mkdir.c, rmdir.c: Replace functions fatal, nonfatal, and
  823.     nonfatal_perror with function error, and rename global var
  824.     `status' to `errors'.
  825.  
  826. Fri Feb  2 11:15:18 1990  David J. MacKenzie  (djm at rice-chex)
  827.  
  828.     * rm.c (main): Recognize new -o option to attempt to override
  829.     protection of unwritable files, bypassing the query while
  830.     still providing error messages.
  831.     (rm): Don't ask question if -o was given.
  832.     (usage): Mention -o +override option.
  833.  
  834.     * chmod.c (main): Recognize new -d option to dereference symlinks,
  835.     setting xstat to stat or lstat appropriately.
  836.     (change_file_mode): Use *xstat instead of lstat.
  837.     (usage): Mention -d option.
  838.  
  839.     * chmod.c (nonfatal_perror): Set `errors' to 1 instead of
  840.     incrementing it.
  841.  
  842.     * mv.c (error): New function to print message and set `errors'.
  843.     (do_move): Call error instead of fprintf and perror.
  844.     (perror): Function definition (for USG) removed.
  845.     (main): Use new global var `errors' for exit status.
  846.     (Makefile): Mention that -DVPRINTF might be needed for USG.
  847.  
  848. Thu Feb  1 15:50:12 1990  David J. MacKenzie  (djm at rice-chex)
  849.  
  850.     * chmod.c (main): Use new global var `errors' for exit status.
  851.     (nonfatal_perror): Increment `errors'.
  852.  
  853. Wed Jan 31 18:59:03 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  854.  
  855.     * ls.c (decode_switches, usage): Change -z option to -S (to
  856.     sort by file size), removing the old meaning of -S (don't
  857.     sort) since it will be wanted rarely enough that +sort=none
  858.     will suffice.  If I think of a good letter for it I might put
  859.     the short option for it back.
  860.     (fatal, error): Change type of arg1 and arg2 to char * from int.
  861.     (decode_switches, xmalloc, xrealloc): Add casts to calls of fatal.
  862.  
  863.     * Makefile (mkdir): Had CFLAGS, wanted LDFLAGS.
  864.  
  865. Tue Jan 30 00:48:46 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  866.  
  867.     * head.c, tail.c, mkdir.c, rmdir.c, dd.c, ls.c: Start all error
  868.     messages with lowercase, for consistency.
  869.  
  870.     * rm.c (rm, clear_directory): Use the existing global var `pathname'
  871.     instead of passing the path to remove as an argument, so that
  872.     if `pathname' is reallocated, the old copy of `pathname' does
  873.     not have to be left around for instances of the rm function
  874.     that have not returned yet, and eventually lost and never freed.
  875.     (rm): Pass pointer to stat structure as arg to clear_directory.
  876.     (clear_directory): Take a pointer to a stat structure as an
  877.     arg.  Copy the directory contents into two buffers before
  878.     processing them, so excessive file descriptors are not
  879.     consumed.  Move the call to check_stack to after the new
  880.     pathname has been constructed, so any error message printed by
  881.     check_stack is accurate.
  882.     (check_stack): Take an i-number instead of a struct direct *
  883.     as an argument.  Remove the check for 'this should never happen'.
  884.     (stp_cpy): New function.
  885.  
  886.     * ls.c: Add -S +sort=none option to disable sorting of
  887.     filenames.  Remove long options that are redundant with +sort,
  888.     +format, or +time to make the option set easier to comprehend.
  889.     (decode_switches): Handle -S option.
  890.     (sort_files): Handle case sort_none.
  891.     (usage): Update message.
  892.  
  893. Mon Jan 29 14:25:47 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  894.  
  895.     * chmod.c (nonfatal_perror): Add arg for describing the
  896.     circumstances in which the error occurred.
  897.     (change_file_mode, change_dir_mode): Add new arg to calls of
  898.     nonfatal_perror.
  899.     (change_dir_mode): Add arg for results of stat on the
  900.     directory.  Read the directory into a buffer before processing
  901.     its contents so excessive file descriptors are not consumed.
  902.     (change_file_mode): Add new arg to call of change_dir_mode.
  903.     (stp_cpy): New function.
  904.  
  905.     * rm.c (clear_directory): If errno is set after failed
  906.     opendir, print the system error message.
  907.  
  908. Fri Jan 26 14:03:12 1990  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  909.  
  910.     * dd.c (pfatal_with_name): Add program name to error message,
  911.     and rearrange message.
  912.     (main, copy): Make error messages clearer.
  913.  
  914.     * rm.c (perror_with_name): Add an argument for describing the
  915.     circumstances in which the error occurred.
  916.     (rm): Add the new argument to perror_with_name calls.
  917.  
  918. Thu Jan 25 15:11:16 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  919.  
  920.     * ls.c (usage): Mention +format=long and +time=use options.
  921.  
  922.     * ln.c (do_link): Use lstat instead of access when testing for
  923.     the existance of the target file, in case the target is a
  924.     symlink. 
  925.  
  926.     * dd.c (main, usage): Remove conv=debug option.  gdb is more useful.
  927.  
  928.     * du.c (usage, main): Alphabetize the options.
  929.  
  930. Wed Jan 24 10:34:27 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  931.  
  932.     * dd.c, du.c, mv.c, rm.c: Change some functions' return types to void.
  933.  
  934.     * cp.c, cp-aux.c, cp-hash.c: Remove void casts and indent.
  935.  
  936.     * dd.c: Un-nest some statements, make comments into full
  937.     sentences, indent.
  938.     (copy): Add program name and explanations to perror messages.
  939.     (pfatal_with_name): Print filename on stderr, not stdout.
  940.  
  941.     * cmp.c: Un-nest some statements, indent.
  942.     (main): Change an error message.
  943.  
  944.     * dirlib.c: Make compilation conditional on NEED_MKDIR instead
  945.     of USG.
  946.     * Makefile: Document NEED_MKDIR.
  947.  
  948.     * rm.c (clear_directory): Account for '/' and '\0' when
  949.     checking whether length of `pathname' is sufficient.
  950.  
  951. Mon Jan 22 00:32:09 1990  David J. MacKenzie  (djm at albert.ai.mit.edu)
  952.  
  953.     * README: New file.
  954.     * Makefile: Include README in distribution.
  955.  
  956. Sun Jan 21 00:40:56 1990  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  957.  
  958.     * system.h [USGr3]: If DIRSIZ is already defined, don't
  959.     redefine it.
  960.  
  961.     * Makefile: Add linking rules for cat, cmp, du, head, ln, mv,
  962.     and tail, for the sake of old makes that don't understand
  963.     ".c:" default rules.  Alphabetize the linking rules.  Add
  964.     INSTALL macro for program to install binaries in BIN
  965.     directory.
  966.  
  967.     * cat.c, cp.c, du.c, ln.c, ls.c, mv.c: Remove declarations
  968.     of alloca; already done in system.h.
  969.  
  970. Tue Jan 16 23:10:17 1990  David J. MacKenzie  (djm at rice-chex)
  971.  
  972.     * Makefile: Fix a couple of typos.
  973.  
  974. Mon Jan 15 01:22:31 1990  David J. MacKenzie  (djm at rice-chex)
  975.  
  976.     * rmdir.c: New file, including -p option for POSIX.
  977.  
  978. Sun Jan 14 21:04:11 1990  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  979.  
  980.     * Makefile: Remove rules for making rmdir.o from rm.c.
  981.     Add rmdir.c to distribution.
  982.  
  983.     * rm.c: Remove support for compiling as rmdir.  It was messy
  984.     to begin with, and would have gotten worse when the POSIX -p
  985.     option was added to rmdir.  Remove -D, +debug option and add -v,
  986.     +verbose option.  Change some error messages.
  987.  
  988. Sat Jan 13 00:14:05 1990  David J. MacKenzie  (djm at rice-chex)
  989.  
  990.     * dirlib.c: New file containing mkdir and rmdir functions for
  991.     old USG systems (empty for BSD).
  992.     * Makefile: Ensure that /bin/sh is the shell used.  Omit
  993.     references to defining USG2, as it is no longer used.
  994.     Break down LIBS into LIBOBJS and LIBS, for versions of make
  995.     that don't correctly handle dependencies on -lfoo.
  996.     (dir.o, vdir.o, rmdir.o): Add commented out alternate
  997.     rules for compilers that can't do -c -o.
  998.     (install): Use cp -f instead of cp.  Instead of copying d and
  999.     v, link them.
  1000.     (mkdir, cp, rmdir): Depend on dirlib.o.
  1001.     (dist): Add dirlib.c to list of files to distribute.
  1002.  
  1003. Fri Jan 12 00:58:18 1990  David J. MacKenzie  (djm at rice-chex)
  1004.  
  1005.     * chmod.c (describe_change): Remove the word `file' from the
  1006.     messages, since it could be misleading when describing
  1007.     directories and other non-regular files.
  1008.  
  1009.     * mv.c (do_move): Don't use access to determine writability of
  1010.     symlinks, as it will return invalid results.
  1011.  
  1012. Thu Jan 11 00:51:17 1990  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1013.  
  1014.     * chmod.c, head.c, ls.c, tail.c (main, usage): Remove
  1015.     version numbers for individual programs, as they have become
  1016.     fairly meaningless.
  1017.  
  1018. Wed Jan 10 02:34:19 1990  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1019.  
  1020.     * chmod.c (change_file_mode, nonfatal_perror): Fix enum type clashes.
  1021.  
  1022.     * cat.c: Rename swallow_empty_lines_after_empty_lines to
  1023.     squeeze_empty_lines for old compilers (sheesh!).
  1024.  
  1025.     * cp.c (copy): Change xstat () to (*xstat) () for old compilers.
  1026.  
  1027.     * system.h: Declare getcwd if USG.  Use USGr3 and SYSNDIR
  1028.     instead of NDIR macro to determine directory routines header
  1029.     file, for compatibility with glob.c.
  1030.  
  1031.     * Makefile: Revise comments for USG.
  1032.  
  1033.     * mv.c (perror): Declare external errno vars.
  1034.     (do_move): Use lstat rather than stat and access.
  1035.  
  1036.     * ls.c (usage): Split message into two for old compilers.
  1037.  
  1038. Thu Jan  4 01:02:59 1990  David J. MacKenzie  (djm at gnu)
  1039.  
  1040.     * cp.h: Do not declare functions that are declared in <strings?.h>.
  1041.  
  1042. Wed Jan  3 23:42:26 1990  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1043.  
  1044.     * system.h: Include <strings.h>, or <string.h> if USG.
  1045.     * cmp.c, du.c, ls.c: Do not directly include <strings.h>.
  1046.     * du.c (blocks_to_kb): If BLKSIZE is defined and equal to
  1047.     1024, just return the number of blocks.
  1048.     * mv.c (perror): Slight change in "unknown error" message.
  1049.     * Makefile: Mention extra HP/UX flag in comment.
  1050.  
  1051. Tue Jan  2 01:10:44 1990  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1052.  
  1053.     * chmod.c (change_dir_mode): Call xmalloc and free less often,
  1054.     and use strcpy instead of sprintf, for speed.
  1055.  
  1056.     * mkdir.c: New program.
  1057.     * Makefile: Add rules for mkdir.
  1058.  
  1059.     * chmod.c: Move several functions into modechange.c and
  1060.     declarations into modechange.h.
  1061.     (change_file_mode): Rename from xchmod.
  1062.     (change_dir_mode): Rename from xchmoddir.
  1063.     * modechange.c: New file of library functions to manipulate file modes.
  1064.     * modechange.h: New header file for modechange.c and programs
  1065.     that use it.
  1066.     * Makefile: Link chmod with modechange.o and include
  1067.     modechange.[ch] in distribution.
  1068.  
  1069. Sun Dec 31 17:42:55 1989  David J. MacKenzie  (djm at rice-chex)
  1070.  
  1071.     * rm.c (rm): Move misplaced quote.
  1072.  
  1073. Fri Dec 29 03:10:51 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1074.  
  1075.     * ln.c (main): Recognize new -f and -i POSIX options, and new
  1076.     -v option for consistency with cp and mv.
  1077.     (do_link): Remove an existing file if -f given, or if -i given
  1078.     and confirmed by user.  List files being linked if -v given.
  1079.     (confirm): New function.
  1080.     (usage): Mention new options.
  1081.  
  1082.     * mv.c (do_move): Slight change in query message.
  1083.     (usage): Alphabetize options listing.
  1084.  
  1085.     * rm.c (yesno): Allow 'Y' as well as 'y' to confirm, for
  1086.     consistency with cp and mv.
  1087.     (rm): Flush output before reading.  Don't print the program
  1088.     name in the interactive queries, for consistency with cp and mv.
  1089.  
  1090.     * ls.c (get_link_name): Instead of guessing the size of the
  1091.     link name, use the file size from stat.
  1092.  
  1093.     * cp.c (main): exit instead of returning, for the benefit of
  1094.     some C compilers that don't handle a return from main correctly.
  1095.     Recognize new POSIX -f option, `flag_force'.
  1096.     (copy): Use flag_force.  Fix typo; had S_IFLINK, wanted S_IFLNK.
  1097.     * cp-aux.c (usage): Mention -f in message and alphabetize the
  1098.     options lists.
  1099.  
  1100.     * rm.c (rm): Make -f option cause -i option to be ignored, for
  1101.     POSIX compatibility.
  1102.  
  1103. Thu Dec 28 03:25:28 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1104.  
  1105.     * Makefile: Change default binary directory from
  1106.     /usr/local/bin to /usr/local/gnubin.
  1107.  
  1108.     * rm.c (xmalloc): Print memory exhausted message even if -f
  1109.     option is given.
  1110.  
  1111.     * cat.c, cp.c, du.c, ln.c, ls.c, mv.c: Declare alloca, with
  1112.     special cases for GNU C and sparc.
  1113.  
  1114.     * du.c, rm.c (xmalloc, xrealloc): Don't pass a null pointer
  1115.     from malloc through if 0 bytes are requested; print an error
  1116.     message, on the assumption that the request for 0 bytes is a bug.
  1117.  
  1118. Fri Dec 22 23:08:33 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1119.  
  1120.     * tail.c (tail_lines): Don't run file_lines on an empty file,
  1121.     to avoid spurious error message.
  1122.  
  1123. Wed Dec 20 00:33:10 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1124.  
  1125.     * du.c (main): Don't truncate a single letter directory name
  1126.     if it is not '/'.
  1127.  
  1128.     * cp.c: Use int instead of uid_t and gid_t; too much trouble
  1129.     to figure out which systems have the typedefs.
  1130.     * system.h: Remove uid_t and gid_t typedefs.
  1131.     Declare alloca if not GNU C or sparc.
  1132.  
  1133.     * mv.c: Move exit (1) from main to usage.
  1134.     (rename): Define if USG, not USG2 (at least this is correct
  1135.     for 386/ix).
  1136.     (perror): New function if USG defined, because System V perror
  1137.     chokes on perror (0).
  1138.  
  1139.     * cat.c, cmp.c, cp-aux.c, dd.c, du.c, head.c, ln.c, ls.c,
  1140.     mv.c, rm.c, tail.c: Combine multiple fprintf calls for usage
  1141.     messages into single calls, to make editing the messages easier.
  1142.  
  1143. Sat Dec 16 16:06:03 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1144.  
  1145.     * Makefile: Add "CC = gcc".
  1146.  
  1147.     * du.c: Change +count-all option to +count-links.
  1148.  
  1149. Fri Dec  8 21:01:29 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1150.  
  1151.     * du.c: Change +combine option to +total.
  1152.     Define INITIAL_PATH_SIZE.
  1153.     Global: fix up some comments and add comments on global
  1154.     variables that lacked them.
  1155.     (usage): Reflect argument change.
  1156.     (main): Use INITIAL_PATH_SIZE.
  1157.     (count_entry): Rename from durec (less cryptic).  Use simpler
  1158.     but functionally equivalent code to determine whether to print
  1159.     the entry's size.
  1160.  
  1161. Mon Dec  4 14:14:22 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1162.  
  1163.     * cat.c (cat): Only number blank lines if nonblank lines are
  1164.     also being numbered.
  1165.  
  1166. Sat Dec  2 13:52:15 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1167.  
  1168.     * du.c: Add descriptive comments to global variable definitions.
  1169.  
  1170. Fri Dec  1 19:10:33 1989  David J. MacKenzie  (djm at trix)
  1171.  
  1172.     * cat.c (main): Make numbers_at_empty_lines default to 1 so -n
  1173.     option works.
  1174.  
  1175.     * Makefile: Add -g to default LDFLAGS.
  1176.     (clean): Use /bin/rm so we don't get ./rm, in case it was
  1177.     compiled for a different architecture.
  1178.  
  1179. Wed Nov 29 10:21:53 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1180.  
  1181.     * du.c: Remove #include <sys/param.h> because system.h now
  1182.     does it.
  1183.  
  1184. Tue Nov 28 00:33:22 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1185.  
  1186.     * ls.c (decode_switches): Add new +format, +time, and +sort
  1187.     options that take strings as args to select output style.
  1188.     Decide name printed in version message at compile time instead
  1189.     of run time.
  1190.     (argmatch): New function to check if a long option arg
  1191.     is valid.
  1192.     (invalid_arg): New function to complain about an
  1193.     invalid arg to a long option and exit.
  1194.     (usage): Document new options.
  1195.  
  1196.     * Makefile (install): Make install depend on all.
  1197.  
  1198. Mon Nov 27 13:09:46 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1199.  
  1200.     * chmod.c (xchmod): stat -> lstat.
  1201.  
  1202. Sun Nov 26 01:28:21 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1203.  
  1204.     * cp-aux.c (user_confirm_overwriting): Print message on stdout
  1205.     instead of stderr to be consistent with mv.  Remove accidental
  1206.     second "Usage:" from string.
  1207.  
  1208.     * mv.c (yes): Put getchar value into an int, not a char.
  1209.  
  1210.     * Makefile (dist): Include glob.c in tar file.
  1211.  
  1212. Sat Nov 25 23:36:54 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1213.  
  1214.     * cp-aux.c (usage), cat.c (usage), cmp.c (usage), du.c (usage),
  1215.     head.c (usage), tail.c (usage), ls.c (usage):
  1216.     Combine separate short and long option usage messages into
  1217.     single messages.
  1218.  
  1219.     * mv.c: Add -v (+verbose) function like cp's to list files as
  1220.     they are moved.  Indent to make spacing consistent.
  1221.     (main): Handle -v option.
  1222.     (movefile): Remove unneccessary temporary variable.
  1223.     (yes): Flush stdout before reading, as a precaution.
  1224.     (do_move): Stat the source file, then if -v was specified,
  1225.     print the from and to names.  Eliminate later stat.
  1226.     (usage): Document -v (+verbose).
  1227.  
  1228. Fri Nov 24 02:41:27 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1229.  
  1230.     * cp-hash.c: Fix spelling in comments.
  1231.  
  1232.     * system.h: For USG, define getwd in terms of getcwd.  Try to
  1233.     get MAXPATHLEN from sys/param.h.
  1234.  
  1235.     * du.c: Indent to standardize spacing.  Don't declare getwd
  1236.     because system.h now does it.  Fix spelling in comments.
  1237.     (xmalloc, xrealloc): New functions to allocate memory with
  1238.     error check.
  1239.     Global: Use xmalloc and xrealloc instead of checking the
  1240.     return value every time.
  1241.     Global: Remove casts to void.
  1242.     (main): Fix apparent typo: had &, wants &&.
  1243.     (durec): Don't simply skip first two directory entries, but
  1244.     check for "." and ".." explicitly.
  1245.  
  1246. Thu Nov 23 16:41:17 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1247.  
  1248.     * rm.c: Rename `no_rmdir_long_opts' to `rm_long_opts'.
  1249.     (main): Merge tests for rmdirflag to determine options into
  1250.     one if statement.  Call usage to print usage message.
  1251.     (usage): New function.  Mention long options.
  1252.     (xmalloc): Change error message.  Return of 0 is ok if 0 bytes
  1253.     requested (ANSI C).
  1254.  
  1255.     * chmod.c (describe_change): Display different messages
  1256.     depending on whether the file's mode has changed or not.
  1257.     (xchmod): Call describe_change with flag telling it whether
  1258.     the file's mode has changed.
  1259.  
  1260.     * cp.c (copy_dir): Instead of always skipping the first two
  1261.     entries of a directory to recursively copy, explicitly skip
  1262.     "." and ".." when they are encountered, because some NFS
  1263.     filesystems have directories without "." and "..".
  1264.     (copy_reg): If less than sizeof(int) bytes have been read,
  1265.     check for blocks of nulls as chars intead of ints; otherwise,
  1266.     the files are zeroed.  (But normally use int comparisons for
  1267.     speed.) 
  1268.  
  1269.     * cp-aux.c (user_confirm_overwriting): Allow a single RET as a
  1270.     negative response.  Flush prompt message in case stderr is
  1271.     line buffered.  Use getchar instead of fgetc.
  1272.  
  1273.     * cp-hash.c: Include stdio.h instead of defining NULL.
  1274.  
  1275.     * cp.h: Don't declare fgetc (no longer used).
  1276.  
  1277.     * Makefile: Move BSD macro defs next to USG defs.
  1278.     Add COPYING to tar file, and add release version to tar file and
  1279.     directory names.  Change LDLAGS typo to LDFLAGS.
  1280.  
  1281. Tue Nov 14 09:43:43 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1282.  
  1283.     * cat.c (main): Make options more flexible.  Add:
  1284.     -E (+show-ends), which is like -e but doesn't imply -v;
  1285.     -T (+show-tabs), which is like -t but doesn't imply -v;
  1286.     -A (+show-all), which is like -ETv.
  1287.     Remove complaints about (needlessly) mutually exclusive
  1288.     options that were there for BSD compatibility, so options
  1289.     accumulate (which is more useful).
  1290.     (usage): Document new option syntax.
  1291.     (cat): Allow tabs to be shown as ^I even if other control and
  1292.     meta characters are not being quoted (so -T works).
  1293.  
  1294.     * Makefile: Add rules for v, vdir, d, and dir.  Remove extra
  1295.     rule for cp that defines uid_t and gid_t; now handled in
  1296.     system.h.  Remove README-cp from tar files; it was replaced by
  1297.     cp.texinfo.  Change CPPFLAGS to LDFLAGS in default rule for
  1298.     making an executable from a .c file.  Don't load getopt into dd.
  1299.  
  1300. Mon Nov 13 10:08:35 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1301.  
  1302.     * ls.c (get_link_name): Take code to prepend leading path back
  1303.     out; long output format needs the original link path.
  1304.     (make_link_path): New function to return the full path of a symlink.
  1305.     (gobble_file): Call make_link_path.  Use the full path for
  1306.     non-long output formats, the original link path for long format.
  1307.  
  1308. Sun Nov 12 15:42:43 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1309.  
  1310.     * ls.c (gobble_file): Don't exchange the name of a symlink to
  1311.     a directory named on the command line with the name of the
  1312.     directory linked to.  (`ls -d /usr/tmp' where /usr/tmp was a
  1313.     symlink to /var/tmp printed `/var/tmp' instead of `/usr/tmp').
  1314.     (get_link_name): For symlinks that are relative paths, prepend
  1315.     the leading path from the link name.
  1316.  
  1317. Fri Nov 10 18:13:52 1989  Torbjoern Granlund  (tege at echnaton.sics.se)
  1318.  
  1319.     * cp.c: (copy) Don't modify the times for symlinks.  The result would
  1320.     be to modify the file which the link points to.
  1321.     (do_copy) Use stat, never lstat, for the target, even if `-d' was
  1322.     specified.  Otherwise, it would be forbidden to copy some
  1323.     files to a directory via a symlink pointing to the directory.
  1324.  
  1325. Sat Nov 11 00:21:32 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
  1326.  
  1327.     * chmod.c (basename): strrchr => rindex.
  1328.  
  1329. Thu Nov  9 11:46:51 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1330.  
  1331.     * rm.c (rm): Make check for symbolic link conditional on S_IFLNK
  1332.     being defined.
  1333.  
  1334. Wed Nov  8 12:23:33 1989  David J. MacKenzie  (djm at spiff)
  1335.  
  1336.     * ls.c: Rename +numerid-id option to +numeric-uid-gid.
  1337.  
  1338. Thu Nov  9 00:13:03 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1339.  
  1340.     * ls.c: Rename +directories-as-files option to +directory.
  1341.  
  1342. Wed Nov  8 23:14:10 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1343.  
  1344.     * ls.c: Rename more long options and adjust usage message.
  1345.     Rename all-files to all.  Rename almost-all-files to almost-all.
  1346.     Rename question-mark to hide-control-chars.  Rename mark-file to
  1347.     classify.  Rename file-size to size.  Make file-type an alias for
  1348.     classify.  Remove long name for -p.
  1349.  
  1350. Tue Nov  7 21:04:04 1989  David J. MacKenzie  (djm at spiff)
  1351.  
  1352.     * ls.c: Make +long a synonym for +verbose and +across an
  1353.     alias for +horizontal.  Rename +follow-symbolic-links to
  1354.     +dereference, and +reverse-sort to +reverse.
  1355.     * cmp.c: Rename +byte-info to +verbose and make +quiet an
  1356.     alias for +silent.
  1357.     * du.c: Rename +combined-args to +combine.
  1358.     * head.c, tail.c: Make +silent an alias for +quiet.
  1359.  
  1360. Sat Nov  4 00:34:00 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1361.  
  1362.     * cp.c: Reorder #includes so it will compile on systems
  1363.     that do special things in stdio.h and need it included early.
  1364.     * cp-aux.c (usage): Update message to reflect current options.
  1365.     * cp.h: Remove duplicate function declarations.
  1366.     * system.h: Define uid_t and gid_t, used by cp.
  1367.  
  1368. Fri Nov  3 17:37:48 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1369.  
  1370.     * head.c, tail.c (main): Add long options using getopt_long and
  1371.     modify short option syntax for Posix conformance.
  1372.     Exit with status 1 if any system errors occurred.
  1373.     Global: Mention the operation that caused system errors in
  1374.     error messages.
  1375.     (nonfatal_perror, fatal_perror): Modify to take 2 args.
  1376.     (atou): New function for parsing arg to -n option.
  1377.     (usage): Describe new argument syntaxes.
  1378.  
  1379. Tue Oct 31 02:03:32 1989  David J. MacKenzie  (djm at spiff)
  1380.  
  1381.     * ls.c (decode_switches): Add long options, using getopt_long
  1382.     instead of getopt.
  1383.     (usage): New function to print usage message, mentioning
  1384.     long options.
  1385.  
  1386.     * tail.c (start_chars, start_lines, file_lines): Make return
  1387.     type int and return an error indicator to avoid duplicate
  1388.     error messages from `dump_remainder'.
  1389.  
  1390.     * cmp.c, du.c, mv.c, rm.c: Mention long options in usage messages.
  1391.  
  1392.     * ln.c: Change `+soft' option to `+symbolic'.
  1393.     (usage): Mention long option.
  1394.  
  1395.     * cat.c (main): Add long options.
  1396.     (usage): Mention long options.
  1397.  
  1398. Mon Oct 30 03:02:47 1989  David J. MacKenzie  (djm at spiff)
  1399.  
  1400.     * head.c, tail.c: Make an open or read error a nonfatal error
  1401.     instead of fatal by globally replacing function xread with read and
  1402.     checking the return value.  Pass the input file name to most
  1403.     functions for error messages.
  1404.  
  1405.     * ln.c: Move variable soft_link outside of main so ln will compile.
  1406.  
  1407. Mon Oct 23 12:19:40 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  1408.  
  1409.     * chmod.c: Clarified some comments, indented file.
  1410.     (nonfatal_perror): Renamed from pnonfatal.
  1411.     (main): Initialize options (formerly done statically).
  1412.     (xchmod): Only call chmod if the mode will actually change.
  1413.  
  1414. Wed Oct 18 22:51:29 1989  David J. MacKenzie  (djm at spiff)
  1415.  
  1416.     * cmp.c, cp.c, du.c, ln.c, rm.c: Add terminating element to
  1417.     long_options.  Make it static in ln.c.
  1418.  
  1419. Tue Oct 17 11:53:14 1989  David MacKenzie  (djm at wam.umd.edu)
  1420.  
  1421.     * ls.c: Added -z option to sort by file size.  Indented file.
  1422.       (compare_size), (rev_cmp_size): New functions to sort by size.
  1423.       (compare_name), (rev_cmp_name): Removed 's' from end of the
  1424.       function names for consistency.
  1425.       (sort_type): Enumerated variable replaces int sort_by_time.
  1426.       (format_needs_stat): New variable for gobble_file.
  1427.       (decode_switches): Recognize -z option.
  1428.       (gobble_file): Replace long calculation with format_needs_stat.
  1429.       (sort_type): Use switch statement to choose sort function.
  1430.       (copystring): Removed unneeded code.
  1431.  
  1432. Tue Oct 17 03:01:17 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
  1433.  
  1434.     * mv.c (main): Typo: had getopt, wants getopt_long.
  1435.     Make long_options static, and add terminating element.
  1436.     Accept EACCES as alternative to EACCESS.
  1437.  
  1438. Sun Oct 15 20:06:33 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
  1439.  
  1440.     * mv.c (do_move): Distinguish lack of write bits
  1441.     from other reasons why `access' would fail for writing.
  1442.  
  1443. Mon Sep 11 11:09:08 1989  David MacKenzie  (djm at wam.umd.edu)
  1444.  
  1445.     * ls.c: Improved sort speed when -r is given.
  1446.     * (sort_files): For reverse sort, instead of calling reverse_files (),
  1447.       call the appropriate reverse compare function.
  1448.     * (reverse_files): Function removed.
  1449.     * (rev_cmp_ctime), (rev_cmp_mtime), (rev_cmp_atime),
  1450.       (rev_cmp_names): New functions that compare files in reverse
  1451.       order.
  1452.  
  1453. Sat Sep  9 12:24:20 1989  David MacKenzie  (djm at wam.umd.edu)
  1454.  
  1455.     * ls.c:
  1456.     (decode_switches): Get screen width from kernel if available.
  1457.     (gobble_file): Clear file[files_index].linkmode whether or not
  1458.     S_IFLNK is defined.
  1459.     (print_long_format): Remove code to set file type character for
  1460.     symbolic links; filemodestring does that.
  1461.  
  1462. Fri Aug 11 19:46:19 1989  David MacKenzie  (edf at rocky2.rockefeller.edu)
  1463.  
  1464.     * tail.c: Added support for giving multiple filenames.  Renamed -h
  1465.     `head of file' switch to -s `start of file', to avoid conflict with
  1466.     possible future -h `help' switch.  Added -q `quiet' and -v
  1467.     `verbose' switches to control printing of filename banners.  Let
  1468.     system.h handle USG adaptations. 
  1469.     Removed all register declarations, as gcc can figure that out ok.
  1470.     Various functions: `number' is no longer negative if tailing
  1471.     from the end of the file.  Changed variable `nread' to `chars_read'.
  1472.     (start_chars): Renamed from head_chars.
  1473.     (start_lines): Renamed from head_lines.
  1474.     (write_header): New function to print filename banner.
  1475.     (tail_file): New function to open a file and tail it, and
  1476.     maybe print a filename banner.
  1477.     (main): Moved file opening code to tail_file.  Added
  1478.     `header_mode' variable and other support for -v and -q and
  1479.     multiple input files.
  1480.     (file_lines): Removed variable is_end_buffer and associated
  1481.     needless convolution.
  1482.     (pipe_lines): Renamed `struct buffer' to `struct linebuffer',
  1483.     and `BUFFER' to `LBUFFER'.  Free all buffers before returning.
  1484.     (pipe_chars): Renamed `struct buffer' to `struct charbuffer',
  1485.     and `BUFFER' to `CBUFFER'.  Free all buffers before returning.
  1486.     (start_lines): Renamed `i' to `chars_to_skip' and simplified
  1487.     inner loop.
  1488.     (usage): Udated to reflect new switches.
  1489.  
  1490. Sun Aug 13 22:53:01 1989  Joy Kendall    (jak at hobbes.ai.mit.edu)
  1491.  
  1492.     * ln.c, mv.c, cmp.c, cp.c, du.c, rm.c: Added long-named
  1493.     option capabilities by changing calls to "getopt" to be
  1494.     calls to "getopt_long", added option structures to each
  1495.     program. (didn't modify Makefile yet ...)
  1496.  
  1497. Sat Aug 12 11:25:54 1989  Richard Stallman  (rms at hobbes.ai.mit.edu)
  1498.  
  1499.     * ln.c: Delete #include of stat.h.  System.h does it.
  1500.  
  1501. Fri Aug 11 00:39:53 1989 David MacKenzie  (edf at rocky2.rockefeller.edu)
  1502.  
  1503.     * ln.c: Major cleanup of comments and code.  Moved function
  1504.     declarations to top of file.  Added #ifdefs for systems without
  1505.     symlinks.
  1506.     (program): Renamed from `pgm'.
  1507.     (linkfunc): Pointer to function returning an int replaces int `dosoft'.
  1508.     (main): Renamed `ac' and `av' to `argc' and `argv'.  Replaced argument
  1509.     parser with one that uses getopt.  Moved usage message to usage
  1510.     function.  Take base of program name.  Renamed `where' to `to'.
  1511.     Exit with status 1 if any links failed.
  1512.     (do_link): Renamed from dolink.  Removed unneeded `l' variable.
  1513.     Call `linkfunc' instead of checking `dosoft'.  Changed error message.
  1514.     Renamed `cp' to `old_base'.
  1515.     (isdir): Renamed `fn' to `file' and `stb' to `stats'.
  1516.     (basename): New function to return base of given path.
  1517.     (usage): New function to print usage message and die.
  1518.  
  1519. Fri Aug 11 19:46:19 1989  David MacKenzie  (edf at rocky2.rockefeller.edu)
  1520.  
  1521.     * head.c: Renamed -p `plain' switch to -q `quiet' (more standard
  1522.     meaning), added -v `verbose' switch.
  1523.     (main): Added variable `header_mode' and other support for -v.
  1524.     Moved the calling of write_header to head_file.
  1525.     (usage): Updated to mention -q and -v; added missing ellipsis.
  1526.  
  1527. Fri Aug 11 19:46:19 1989  David MacKenzie  (edf at rocky2.rockefeller.edu)
  1528.  
  1529.     * system.h: Defined L_SET and L_XTND (used by lseek in tail).
  1530.  
  1531. Thu Aug 10 20:03:27 1989  David MacKenzie  (edf at rocky2.rockefeller.edu)
  1532.  
  1533.     * head.c: Let system.h figure out the USG adaptations.  Revise
  1534.     some comments.
  1535.     (write_header): Rename variable `first_time' to `first_file'.
  1536.     (head_lines): Simplify inner loop to remove redundant tests.
  1537.  
  1538. Wed Aug  9 16:17:32 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
  1539.  
  1540.     * mv.c: Let system.h include sys/file.h if needed.
  1541.     Declare rindex at top of file.
  1542.     (main): Print usage message for unknown option.
  1543.     (usage): Clean up message.
  1544.  
  1545. Tue Aug  1 11:42:20 1989  Jay Fenlason  (hack at apple-gunkies.ai.mit.edu)
  1546.  
  1547.     * cat.c (cat):  Added "ch = *bpin++;" to test case for
  1548.     swallow_empty_lines_after_empty_lines so that cat -s would
  1549.     work.  I suspect that -s was never tested.
  1550.  
  1551. Wed Jul 12 19:51:13 1989  David MacKenzie  (edf at rocky2.rockefeller.edu)
  1552.  
  1553.     * cat.c (cat): Move `#ifdef FIONREAD' to prevent an uninitialized
  1554.     variable `n_to_read' from being checked if FIONREAD undefined.
  1555.  
  1556. Fri Jul  7 19:53:21 1989  David MacKenzie  (edf at rocky2.rockefeller.edu)
  1557.  
  1558.     * chmod.c: New program.
  1559.  
  1560.     Makefile: Added rules for chmod.
  1561.  
  1562.     GNUmakefile: Added chmod to list of executables.
  1563.  
  1564. Tue Jun 27 14:55:04 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
  1565.  
  1566.     * rm.c (rm): Don't confirm to remove symlinks for which access (, W_OK)
  1567.     fails.
  1568.  
  1569. Thu Jun 22 17:18:05 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
  1570.  
  1571.     * cp.c (copy): When copying directories recursively, recreate all file
  1572.     types.  When not copying directories recursively, copy the contents of
  1573.     all files but directories.
  1574.  
  1575. Wed Jun 21 22:46:46 1989  Roland McGrath  (roland at hobbes.ai.mit.edu)
  1576.  
  1577.     * cp.c (copy): When not copying directories recursively, allow copying
  1578.     between mismatched file types.
  1579.  
  1580. Sat Jun 10 00:19:11 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
  1581.  
  1582.     * ls.c: Don't include sys/file.h; done in system.h.
  1583.  
  1584.     * cp.c (copy): Shift S_IEXEC to bits for "others".  S_WRITE also.
  1585.  
  1586.     * system.h [BSD]: sys/dir.h, not dir.h.
  1587.  
  1588. Thu Jun  8 16:32:26 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
  1589.  
  1590.     * system.h: Include stat.h, so we can test S_IFLNK.
  1591.     * *.c: Don't include stat.h redundantly.
  1592.  
  1593. Wed Jun  7 14:27:17 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
  1594.  
  1595.     * Makefile: Don't use $^.
  1596.  
  1597.     * system.h (NLENGTH): New macro for length of name of dir entry.
  1598.     (DIRSIZ): Define this on systems that don't.
  1599.     (DIRECT): This flag is eliminated.
  1600.  
  1601.     * ls.c: Conditionalize all code using symlinks on S_IFLNK.
  1602.     Let system.h bring in sys/file.h.
  1603.     Reinstall new definition of nblocks.
  1604.  
  1605.     * du.c (durec): Use NLENGTH.
  1606.  
  1607.     * system.h [no S_IFLNK] : define lstat as stat.
  1608.  
  1609.     * cp.c (copy): Don't check for symlinks if there are none.
  1610.     (copy_dir): Use `struct direct'.
  1611.  
  1612.     * Makefile (clean): Fix typo.
  1613.  
  1614.     * dd.c: Include sys/types.h.
  1615.  
  1616.     * mv.c (do_move): Eliminate busted USG conditional on value of rename.
  1617.  
  1618.     * mv.c (do_move): Declare local `val'.
  1619.  
  1620. Sun Jun  4 22:36:08 EDT 1989  David MacKenzie  (edf at rocky2.rockefeller.edu)
  1621.  
  1622.     * ls.c: Advanced version to 1.6.  Automatically trace symbolic links
  1623.     to directories named on command line. 
  1624.     Removed useless help message and -h switch.
  1625.     (struct file): Added `linkmode' field for printing the filetype
  1626.     of files that are symbolically linked to.
  1627.     (struct pending): Added `realname' field to allow listing of
  1628.     directories that are symbolically linked to under the name of
  1629.     the symbolic link.
  1630.     (help_message): Removed unhelpful help message.  Might be
  1631.     reinstated later in a more useful form.
  1632.     (trace_links_to_dirs): Removed old variable controlled by -D.
  1633.     (main): Removed unneeded `thisdir' variable.
  1634.     Reorganized listing of pending directories.
  1635.     (decode_switches): Removed -h and -D, changed behavior of -L.
  1636.     Broke usage message into two strings to fit into code indentation.
  1637.     (queue_directory): Added `realname' argument for symbolic links to
  1638.     directories.  Also added it to linked list.
  1639.     (print_dir): Added `realname' argument for symbolic links to
  1640.     directories.  Use it for printing directory name if nonzero.
  1641.     (file_interesting): Renamed from file_interesting_p -- C's not Lisp.
  1642.     (gobble_file): Moved code that reads symbolic link name into
  1643.     get_link_name.     Reorganized so it automatically traces symbolic links
  1644.     to directories.  Renamed `concat' variable to `path'.  Stat files
  1645.     that are symbolically linked to for later filetype indicator in
  1646.     long listing format.
  1647.     (get_link_name): Created a new function with some code taken
  1648.     from gobble_file.
  1649.     (extract_dirs_from_files): Renamed `concat' variable to `path'.
  1650.     Pass linkname to queue_directory.  Use malloc and free in loop
  1651.     instead of alloca to avoid wasting lots of stack space.
  1652.     (print_long_format): Renamed `mbuf' to `modebuf' and `tbuf' to
  1653.     `timebuf'.  Print filetype indicator on name of file
  1654.     symbolically linked to rather than on the link.  This is what
  1655.     the SunOS 4.0 ls does.
  1656.     (print_type_indicator): Changed argument type from `struct file *' to 
  1657.     `unsigned int' so it can be used to print the mode of files that
  1658.     are symbolically linked to.
  1659.     (getgroup): Changed argument name from `uid' to `gid'.  Changed
  1660.     name of `usernum_string' variable to `groupnum_string'.
  1661.     (xrealloc): Added "virtual " to error message.
  1662.     (xmalloc): Added "virtual " to error message.
  1663.     (perror_with_name): Removed unneeded `err' variable.
  1664.  
  1665. Tue May 30 18:24:12 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
  1666.  
  1667.     * Makefile (rm, du): Add linking rules to use $(LIBS).
  1668.  
  1669. Mon May 29 22:03:19 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
  1670.  
  1671.     * ln.c (dolink): Make arg of perror a null string.
  1672.     * mv.c (rename): If USG2, define using link and unlink.
  1673.  
  1674.     * cp.h: Include system.h.  Don't declare alloca.
  1675.     * cp.c: Use ST_BLKSIZE.  Cast all calls to alloca.
  1676.     (main) [USG]: Alternate code for getting group id.
  1677.     (copy): Don't use S_IFSOCK if not defined.
  1678.     Alternate code for setting file's time.
  1679.     (copy_reg): Don't use ftruncate on USG.
  1680.  
  1681.     * system.h: Define macros for system-independence.  Define alloca.
  1682.     * du.c: Include system.h.  Don't declare alloca, cast its calls.
  1683.     (durec): Compensate on USG for lack of st_blksize.
  1684.     * cat.c: Include system.h.  Use new macro ST_BLKSIZE.
  1685.     (cat): Error if need FIONREAD and don't have it.
  1686.  
  1687.     * cmp.c, dd.c, ls.c, rm.c: Use system.h.
  1688.  
  1689. Sat May 27 01:06:51 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
  1690.  
  1691.     * cat.c: Clean up assignments nested within other things.
  1692.  
  1693. Thu May 25 18:54:34 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
  1694.  
  1695.     * cmp.c (cmp): Use POSIX standard for no-options output format.
  1696.  
  1697. Tue May 23 12:13:12 1989  Randall Smith  (randy at apple-gunkies.ai.mit.edu)
  1698.  
  1699.     * mv.c (main), ln.c (main): Added exit(0)'s at the end of each to
  1700.     guarantee sucessful (for shell scripts).
  1701.  
  1702. Thu May 11 16:42:51 1989  Jay Fenlason  (hack at apple-gunkies.ai.mit.edu)
  1703.  
  1704.     * tail.c (file_lines): Output the entire file if the file fits in
  1705.     a single buffer and contains EXACTLY the number of lines asked for.
  1706.  
  1707. Fri May  5 18:17:46 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
  1708.  
  1709.     * cmp.c (cmp): Output discrepancies to stdout, not stderr.
  1710.  
  1711. Wed May  3 10:43:15 1989  Jay Fenlason  (hack at spiff)
  1712.  
  1713.     * du.c, ln.c, ls.c, mv.c:  added #ifdef sparc for alloca stuff.
  1714.  
  1715.     * Makefile: added 'clean', 'dist' and 'getopt.o' entries.
  1716.  
  1717. Thu Mar  2 1989 23:31:27  David MacKenzie  (edf at rocky2.rockefeller.edu)
  1718.  
  1719.     * ls.c: Moved some non-option variable definitions from amidst
  1720.     the option variables to before them.  Added -k and -I options.
  1721.     Advanced version to 1.4.
  1722.     (nblocks): Adjust number of blocks if -k given.
  1723.     (indicator_style): An enum, replacing the int print_filetype.
  1724.     (kilobyte_blocks): Added variable to show block sizes as
  1725.     1024-bytes instead of 512-bytes.
  1726.     (ignore_patterns): linked list replaces the int
  1727.     ignore_backup_files with a more general mechanism.
  1728.     (main): Moved the clearing of dir_defaulted out of a loop.
  1729.     (decode_options): Added support for -k and -I and reimplemented
  1730.     -B in terms of -I (calls to add_ignore_pattern).
  1731.     (add_ignore_pattern): New function to add an element to the
  1732.     list of patterns for files to ignore.
  1733.     (file_interesting_p): Replaced check for backup file suffix with
  1734.     calls to glob_match on the files in ignore_patterns.  ls -aB now
  1735.     doesn't display files that match `.*~'.
  1736.  
  1737. Mon Feb 20 1989 01:23:52  David MacKenzie  (edf at rocky2.rockefeller.edu)
  1738.  
  1739.     * ls.c: Modified -C format.  Advanced version to 1.3.
  1740.     (version_string): Moved comments up to top of file and version
  1741.     string into decode_switches ().
  1742.     (program_name): Added variable to contain base of name program
  1743.     was actually run with (could be one of `ls, dir, d, vdir, v').
  1744.     (main): Set program_name.  Don't check for null arguments, as
  1745.     decode_switches no longer creates them (and hasn't for awhile).
  1746.     (decode_switches): Don't decrement line_length by 1.  Print
  1747.     actual program name in version message and exit afterward.
  1748.     Check -w argument for valid values.
  1749.     (print_many_per_line):  Removed variables longcols and
  1750.     start_shortcol and renamed lineno to row and nlines to rows.
  1751.     Rewrote algorithm to more closely mimic Unix ls.
  1752.     (print_horizontal): Renamed perline to cols and added error
  1753.     checks on line length.
  1754.     (error): Print actual program name in error message.
  1755.     (basename): New function to return name stripped of leading path.
  1756.  
  1757. Mon Feb 13 22:50:45 EST 1989  David MacKenzie  (edf at rocky2.rockefeller.edu)
  1758.  
  1759.     * chmod.c: Added -c option.  Advanced version to 1.2.
  1760.     (changes_only): Added new variable to determine whether to
  1761.     verbosely show all new modes or only those that actually change.
  1762.     Set by -c.
  1763.     (xchmod): If changes_only is true, check that the new mode is
  1764.     different from the old mode before describing the change.
  1765.  
  1766. Sun Feb 12 08:41:20 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
  1767.  
  1768.     * cat.c: Don't include strings.h.
  1769.     (itoa): Deleted.
  1770.     (error): Take error code as extra arg; all calls changed.
  1771.     Use fprintf, not itoa.
  1772.     (main): No error for repeated option.
  1773.  
  1774. Sat Feb 11 03:55:44 1989  Torbjorn Granlund  (rms at sugar-bombs.ai.mit.edu)
  1775.  
  1776.     * cat.c (main): Fix how ARGBAD elts are set.
  1777.     Leave one extra byte at end of ARGBAD.
  1778.     Close the input descriptors, and report errors on close.
  1779.  
  1780. Fri Feb 10 05:15:17 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
  1781.  
  1782.     * du.c: Change dirent.h and `struct dirent'
  1783.     to sys/dir.h and struct direct.
  1784.     (struct htab): Make `hash' field length 1, not 0.
  1785.     (hash_insert): Check realloc even if it's to make the block smaller.
  1786.  
  1787. Wed Feb  8 07:52:39 EST 1989  David MacKenzie  (edf at rocky2.rockefeller.edu)
  1788.  
  1789.     * chmod.mackenzie (main): Added modeind variable to allow
  1790.     options to be specified    after the mode.
  1791.  
  1792. Wed Feb  8 07:52:39 EST 1989  David MacKenzie  (edf at rocky2.rockefeller.edu)
  1793.  
  1794.     * ls.c (attach): New fn to concat dirname and filename cleanly.
  1795.     Called in various places.
  1796.     (main): Set EXPLICIT_ARG when calling gobble_file for `.'.
  1797.  
  1798.     * dd.c: Moved function decl's to top of file.
  1799.     Removed commas after last elements in tables.
  1800.     (scanargs): changed "bad arg: %s" messages to GNU-getopt-like
  1801.     "unrecognized option `%s'".
  1802.     (parse_conversion): changed "bad conversion" message to "invalid
  1803.     conversion".
  1804.     (usage): Added function to print usage message.
  1805.  
  1806. Sat Feb  4 00:44:45 EST 1989  David MacKenzie  (edf at rocky2.rockefeller.edu)
  1807.  
  1808.     * ls.c (enum filetype): Added arg_directory.
  1809.     (gobble_file): Give command line dir args type arg_directory
  1810.     unless -d selected.
  1811.     (extract_dirs_from_files): Only delete command line dir args
  1812.     from listing, for Unix compatibility.
  1813.     (print_many_per_line): Renamed variables: i to filesno, i1 to
  1814.     lineno, max to max_name_length, tem to name_length.
  1815.     (print_horizontal): Renamed variables: i to filesno, max to
  1816.     max_name_length, tem to name_length.
  1817.     (print_with_commas): Renamed variables: i to filesno, col to
  1818.     pos, ocol to oldpos.
  1819.  
  1820. Fri Feb  3 23:06:33 EST 1989  David MacKenzie  (edf at rocky2.rockefeller.edu)
  1821.  
  1822.     * tail.c: moved function decl's to separate lines.  moved
  1823.     function def'n types to their own lines.  advanced version to 2.2.
  1824.  
  1825. Fri Feb  3 23:02:40 EST 1989 David MacKenzie (edf at rocky2.rockefeller.edu)
  1826.  
  1827.     * head.c: moved function decl's to one per line.  put function
  1828.     def'n types on their own lines.
  1829.     (main): changed to version 1.1.
  1830.     (write_header): changed "<<==" to "<==".
  1831.  
  1832. Fri Feb  3 01:32:39 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
  1833.  
  1834.     * ls.c (decode_switches): Default -b for `dir' and `vdir'.
  1835.     -q turns off -b.  New option -N turns off -q and -b.
  1836.  
  1837.     * ls.c (print_name_with_quoting): Handle -q flag;
  1838.     don't print ctl chars as self unless -q.
  1839.     (decode_switches): Set qmark_funny_chars according to -q.
  1840.     Default it to 1 if output to tty.
  1841.  
  1842. Thu Feb  2 23:38:13 EST 1989  David MacKenzie  (edf at rocky2.rockefeller.edu)
  1843.  
  1844.     * ls.c (getgroup): changed user_alist to group_alist.
  1845.  
  1846. Wed Feb  1 01:04:22 EST 1989  David MacKenzie  (edf at rocky2.rockefeller.edu)
  1847.  
  1848.     * ls.c (print_dir_name): print directory name if 1.
  1849.     (main): added code to set print_dir_name, then clear it if
  1850.     exactly one dir arg is given or if default dir is used,
  1851.     then set it after first dir is listed.
  1852.     (print_dir): removed code that sets dir_defaulted and changed
  1853.     the variable that controls whether dir names are printed from
  1854.     dir_defaulted to print_dir_name.
  1855.     (decode_switches): redirected version message to stderr.
  1856.  
  1857. Sun Jan 29 00:34:42 1989  David MacKenzie  (rms at sugar-bombs.ai.mit.edu)
  1858.  
  1859.     * ls.c: More include files.  Forward-declare more fcns at start.
  1860.     (nblock, nlength): Macros to extract file size from `stat' and
  1861.     file name length from dir entry.  Called where appropriate.
  1862.     (numeric_users): 1 if -n spec'd.
  1863.     (help_message): help_msg renamed.
  1864.     (main): Print blank line between spec'd files and spec'd dirs.
  1865.     Variable `dir_defaulted' always set to 1 if no files spec'd.
  1866.     Exit instead of returning.
  1867.     (decode_switches): Use `isatty', not `TIOCGETP'.
  1868.     Initialize numeric_users.  Recognize `n' option.  `V' is alias for `v'.
  1869.     Print help for unrecognized option.
  1870.     (print_dir): Don't copystring the file names.
  1871.     (clear_files): Don't free linkname if null
  1872.     (gobble_file): copystring the name.
  1873.     Use a switch to decode the type of file.
  1874.     (extract_dirs_from_files): precompute length of DIRNAME.
  1875.     Other minor rearrangements.
  1876.     (print_type_indicator): fn split out from print_file_name_and_frills.
  1877.     (print_long_format): Rename `time' to `when'.
  1878.     Print userid and group numerically if `-n'.
  1879.     Call print_type_indicator if -F specified.
  1880.  
  1881. Wed Jan 25 21:16:43 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
  1882.  
  1883.     * du.c (durec, main): fflush if anything is printed.
  1884.  
  1885. Fri Dec 16 13:54:03 1988  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)
  1886.  
  1887.     * tail.c: New version from David MacKenzie uses getopt for new
  1888.     option syntax, but also supports the old one.  Other cleanups too.
  1889.  
  1890. Unk May  0 ........ 1988  Roland McGrath  (roland at wheaties.ai.mit.edu)
  1891.  
  1892.     * ls.c: Implement -g.  -B -A does not display .*~.
  1893.     Other cleanups.
  1894.  
  1895. Unk Jan  0 ........ 1988  Jay Fenlason  (hack at wheaties.ai.mit.edu)
  1896.  
  1897.     * ls.c: Make ls -Ra not loop in ././././...
  1898.  
  1899. ... ... .. ........ 1985  Jay Lepreau  (lepreau@cs.utah.edu)
  1900.  
  1901.     * tac.c: Rewritten to allocate memory dynamically, handle string
  1902.     bounded segments (suggested by Rob Pike), and handle pipes.
  1903.  
  1904.     Original line-only version by unknown author; posted Oct
  1905.     1982 by Lou Salkind [of Columbia], not the author.
  1906.  
  1907. Local Variables:
  1908. mode: indented-text
  1909. left-margin: 8
  1910. version-control: never
  1911. End:
  1912.